$(document).ready(function () {
	$('#myWorkDeskImage').click(function () {//我的工作台
		//redirectPage('');
		var url = "/ag/do/endProcessingEvent_exitProcessing.action";
		$.post(url,{},function(data) {
			if(data.result==="success"){
				//alert("退出处置");
				parent.parent.window.location.replace("/ag/center.jsp");
			}
		});
		
	});
	$('#myWorkDeskLink').click(function () {
		//redirectPage('');
		var url = "/ag/do/endProcessingEvent_exitProcessing.action";
		$.post(url,{},function(data) {
			if(data.result==="success"){
				//alert("退出处置");
				parent.parent.window.location.replace("/ag/center.jsp");
			}
		});
	});
	$('#analyzeImage').click(function () {//工情分析
		//var timestamp = Date.parse(new Date());
		redirectPage("/ag/zhh/content/analyse.jsp");
	});
	$('#analyzeLink').click(function () {
		var timestamp = Date.parse(new Date());
		redirectPage('/ag/do/analyze_findById.action?timestamp='+timestamp);
	});
	$('#eventImage').click(function () {//事件关联
		redirectPage('zhh/content/eventRelated.jsp');
	});
	$('#eventLink').click(function () {
		redirectPage('zhh/content/eventRelated.jsp');
	});
//	$('#informImage').click(function () {
//		redirectPage('/ag/do/dept_findDept.action');
//	});
//	$('#informLink').click(function () {
//		redirectPage('/ag/do/dept_findDept.action');
//	});
	$('#adviceImage').click(function () {//处置建议
		redirectPage('/ag/dgm/findAdviceByType_DGMdisposalAdvice.action?atIdString=0000000000');
	});
	$('#adviceLink').click(function () {
		redirectPage('/ag/dgm/findAdviceByType_DGMdisposalAdvice.action?atIdString=0000000000');
	});
	$('#addTaskImage').click(function () {//任务分派
		//alert("iiiiiiiiiiiiiiiiii");
		redirectPage('/ag/zhh/zhhaddtask3.jsp');
	});
	$('#addTaskLink').click(function () {
		redirectPage('/ag/zhh/zhhaddtask3.jsp');
	});
	$('#feedbackImage').click(function () {//任务追踪
		redirectPage('/ag/zhh/zhh_task_main.jsp');
	});
	$('#feedbackLink').click(function () {
		redirectPage('/ag/zhh/zhh_task_main.jsp');
	});
//	$('#reportImage').click(function () {
//		redirectPage('/ag/dgm/EventReport.jsp');
//	});
//	$('#reportLink').click(function () {
//		redirectPage('/ag/dgm/EventReport.jsp');
//	});
	$('#exitImage').click(function () {//结束处置
		//window.parent.parent.location.href('../login.html');
		var url = "/ag/do/endProcessingEvent_processEventEnd.action";
		$.post(url,{},function(data) {
			if(data.result==="success"){
				//alert("结束处置");
				//parent.parent.window.location.replace("/ag/index.jsp");
				parent.parent.parent.window.location.replace("/ag/index.jsp");
			}
		});
	});
	$('#exitLink').click(function () {
		//window.parent.parent.location.href('../login.html');
		var url = "/ag/do/endProcessingEvent_processEventEnd.action";
		$.post(url,{},function(data) {
			if(data.result==="success"){
				//alert("结束处置");
				//parent.parent.window.location.replace("/ag/index.jsp");
				parent.parent.parent.window.location.replace("/ag/index.jsp");
			}
		});
		
	});

});



function redirectPage(url){
	
	var centerMain = $("#main",window.parent.centerFrame.document).attr("src",url);
	
}